package com.chenc.unitdemo.jwt.golbal;

/**
 * @Author: dyhu
 * @Date: 2019/10/22 15:11
 */

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class CodeMsg implements Serializable{
    //通用的异常
    public final static CodeMsg SUCCESS = new CodeMsg(200,"执行成功");
    public final static CodeMsg SERVER_ERROR = new CodeMsg(500,"服务端异常错误");
    public final static CodeMsg NO_PERMISSION = new CodeMsg(403,"无权限访问");
    public final static CodeMsg NO_CONTENT = new CodeMsg(404,"无查询结果");
    public final static CodeMsg UNAUTHORIZED = new CodeMsg(401,"未登录错误");
    public final static CodeMsg MISSING_ARGS = new CodeMsg(400, "参数不全或者参数格式不正确");

    /**
     * 返回编码
     **/
    private int code = 200;
    /**
     * 提示信息
     */
    private String msg = "执行成功";
}
